Skip to content

add UIManagerCommitHook::shadowTreeDidFinishTransaction#55046

Closed
zeyap wants to merge 2 commits into
react:mainfrom
zeyap:export-D89573534
Closed

add UIManagerCommitHook::shadowTreeDidFinishTransaction#55046
zeyap wants to merge 2 commits into
react:mainfrom
zeyap:export-D89573534

Conversation

@zeyap

@zeyap zeyap commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

Summary:

Changelog:

[General] [Added] - add UIManagerCommitHook::shadowTreeDidFinishTransaction

Added this API so we can tell at end of Fabric mount phase which source the commit comes from. This is useful for identifying that a React update just gets mounted.

  • UIManagerMountHook::shadowTreeDidMount is called at similar timing however it doesn't include CommitSource information

Differential Revision: D89573534

zeyap added 2 commits January 5, 2026 14:07
…View

Summary:
## Changelog:

[General] [Added] - optionally calculate originFromRoot for ShadowNode and pass to ShadowView

* If a LayoutableShadowNode calls `layout()` with `LayoutContext.includeOriginFromRoot==true`, all its (recursive) children will calculate `originFromRoot`. This will be needed for shared transition/view transition, where we'll later need to know the absolute position of a shadowNode/shadowView
  * if includeOriginFromRoot is false, there's no overhead of calculating `originFromRoot_` field
* the way originFromRoot is calculated: we first initialize `originFromRoot_` on the LayoutableShadowNode that enables `includeOriginFromRoot` (using `LayoutableShadowNode::computeRelativeLayoutMetrics`, which traverses all the ancestors), then calculate originFromRoot for children in its subtree recursively (`LayoutableShadowNode::computeOriginFromRoot` which only calculates by the difference from immediate parent)

Differential Revision: D89573536
Summary:
## Changelog:

[General] [Added] - add UIManagerCommitHook::shadowTreeDidFinishTransaction

Added this API so we can tell at end of Fabric mount phase which source the commit comes from. This is useful for identifying that a React update just gets mounted.
* UIManagerMountHook::shadowTreeDidMount is called at similar timing however it doesn't include CommitSource information

Differential Revision: D89573534
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 5, 2026
@meta-codesync

meta-codesync Bot commented Jan 5, 2026

Copy link
Copy Markdown

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89573534.

@react-native-bot

Copy link
Copy Markdown
Collaborator

Closing this PR as the diff D89573534 has been abandoned internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants